<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<!--  当屏幕大于640px 以上 div 显示2个 ,小于显示1个 -->
<!-- 引入媒体查询资源  -->
<link rel="stylesheet" href="320CSS" media="screen and (min-width:320px)">
<link rel="stylesheet" href="640CSS" media="screen and (min-width:640px)">
<style>
    @media screen and (min-width:320px) {
        html {
            font-size: 50px;
        }
    }

    @media screen and (min-width:640px) {
        html {
            font-size: 100px;
        }
    }

    .top {
        height: 1rem;
        font-size: .5rem;
        background-color: green;
        color: aliceblue;
        text-align: center;
        line-height: 1rem;
    }
</style>

<body>
    <div class="top">
        购物车
    </div>

</body>

</html>